<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
    body {
      background-color: rgb(10, 255, 51);
    }
    .box {
      padding-top: 200px;
      display: flex;
      justify-content: center;
    }
    .box span{
      padding: 1vw 2vw;
      font-size: 3.5vw;
      text-align: center;
      line-height: 4vw;
      border: 1px solid #fff;
      background-color: #000;
      color: #fff;
    }
    .box span:nth-child(-n + 4){
      border-right: 0;
    }
    .box span:first-child {
      border-radius: 1vw 0 0 10px;
    }
    .box span:last-child {
      border-radius: 0 1vw 1vw 0;
    }
  </style>
</head>

<body>
  <div class="box">
    <span class="hour"></span>
    <span>:</span>
    <span class="minute"></span>
    <span>:</span>
    <span class="second"></span>
  </div>
  <script>
    var h = document.querySelector('.hour')
    var m = document.querySelector('.minute')
    var s = document.querySelector('.second')

    var hour = 0, minute = 1, second = 13

    function format(val) {
      return val < 10 ? '0' + val : val
    }

    function run() {
      if (hour === 0 && minute === 0 && second === 0) {
        clearInterval(timerId)
      }
      if(--second < 0){
        second = 59
        minute--
      }
      if(minute < 0){
        minute = 59
        hour-- 
      }

      h.innerHTML = format(hour)
      m.innerHTML = format(minute)
      s.innerHTML = format(second)

    }
    run() 
    var timerId = setInterval(run, 1000)
  </script>
</body>

</html>